/* eslint-disable global-require */
import React from 'react';
import { Route, IndexRoute } from 'react-router';

// require.ensure polyfill for node
if (typeof require.ensure !== 'function') {
  require.ensure = function requireModule(deps, callback) {
    callback(require);
  };
}

/* Workaround for async react routes to work with react-hot-reloader till
  https://github.com/reactjs/react-router/issues/2182 and
  https://github.com/gaearon/react-hot-loader/issues/288 is fixed.
 */
if (process.env.NODE_ENV !== 'production') {

  // require('./modules/Calendar/pages/Schedule/Schedule');
  require('./modules/SearchSystem/SearchHome/')

}

// react-router setup with code-splitting
// More info: http://blog.mxstbr.com/2016/01/react-apps-with-pages/
export default (
    // <Route
    //   path="editSchedule/:scheduleId"
    //   getComponent={(nextState, cb) => {
    //     require.ensure([], require => {
    //       cb(null, require('./modules/Calendar/pages/EditSchedule/EditSchedule').default);
    //     });
    //   }}
    // />
    <Route
     path={"/"}
     getComponent={(nextState,cb)=>{
       require.ensure([],require=>{
         cb(null,require('./modules/SearchSystem/SearchHome/').default);
       });
     }}
    />
);
